package org.ourgrid.broker.business.scheduler.workqueue.xmlcreator;

public class UnwantWorkerXMLCreator implements XMLCreatorIF {
	
	
	/**
	 * <UNWANT_WORKER peerID='String' workerAddress='String' requestID='long' jobID='int' requiredWorkers='int'
	 *          maxFails='int' maxReplicas='int'/>
	 */
	public String getXML(String peerAddress, String workerAddress, long requestID, long jobID, int requiredWorkers,
			int maxFails, int maxReplicas) {
		
		StringBuffer buffer = new StringBuffer();
		
		buffer.append("<UNWANT_WORKER ");
		buffer.append("peerAddress='" + peerAddress + "' ");
		buffer.append("workerAddress='" + workerAddress + "' ");
		buffer.append("requestID='" + requestID + "' ");
		buffer.append("jobID='" + jobID + "' ");
		buffer.append("requiredWorkers='" + requiredWorkers + "' ");
		buffer.append("maxFails='" + maxFails + "' ");
		buffer.append("maxReplicas='" + maxReplicas + "' ");
		buffer.append("/>");
		
		return buffer.toString();
	}
	
	

}
